home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-12-04 | 2.9 KB | [ TEXT/CCL2]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
Confidence Program Detection Match Type Support
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, inited, Wed Dec 4 07:48:37 1991, modified Wed Dec 4 07:48:37 1991, creator Common Lisp 2, type ASCII, 2209 bytes "THOUGHTS" , at 0x921 436 bytes resource
default (weak)
99%
file
data
default
74%
TrID
Macintosh plain text (MacBinary)
default
25%
TrID
MacBinary 2
default (weak)
100%
siegfried
fmt/1762 MacBinary (II)
default
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ CCL2]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 08 54 48 4f 55 47 48 | 54 53 00 00 00 00 00 00 |..THOUGH|TS......| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 43 43 4c | 32 01 00 00 00 00 00 00 |.TEXTCCL|2.......| |00000050| 00 00 00 00 00 08 a1 00 | 00 01 b4 a5 62 7f 25 a5 |........|....b.%.| |00000060| 62 7f 25 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |b.%.....|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f5 aa 00 00 |........|........| |00000080| 54 68 65 20 6c 69 74 74 | 6c 65 20 62 6f 6f 6b 20 |The litt|le book | |00000090| 61 62 6f 75 74 20 69 6e | 74 65 72 66 61 63 69 6e |about in|terfacin| |000000a0| 67 20 4d 43 4c 20 61 6e | 64 20 54 68 69 6e 6b 43 |g MCL an|d ThinkC| |000000b0| 0d 28 61 6e 64 20 69 6e | 20 67 65 6e 65 72 61 6c |.(and in| general| |000000c0| 2c 20 61 62 6f 75 74 20 | 69 6e 74 65 72 66 61 63 |, about |interfac| |000000d0| 69 6e 67 20 74 77 6f 20 | 6c 61 6e 67 61 67 65 73 |ing two |langages| |000000e0| 29 0d 0d 48 65 72 65 20 | 61 72 65 20 73 6f 6d 65 |)..Here |are some| |000000f0| 20 74 68 6f 75 67 68 74 | 73 20 74 68 61 74 20 67 | thought|s that g| |00000100| 72 65 77 20 6f 75 74 20 | 6f 66 20 6d 79 20 74 72 |rew out |of my tr| |00000110| 69 61 6c 73 20 61 6e 64 | 20 65 72 72 6f 72 73 0d |ials and| errors.| |00000120| 77 68 65 6e 20 49 20 73 | 74 61 72 74 65 64 20 69 |when I s|tarted i| |00000130| 6e 74 65 72 66 61 63 69 | 6e 67 20 4d 43 4c 20 61 |nterfaci|ng MCL a| |00000140| 6e 64 20 54 68 69 6e 6b | 43 3a 0d 0d 20 20 57 68 |nd Think|C:.. Wh| |00000150| 65 6e 20 79 6f 75 20 64 | 65 63 69 64 65 20 74 6f |en you d|ecide to| |00000160| 20 69 6e 74 65 72 66 61 | 63 65 20 74 77 6f 20 6c | interfa|ce two l| |00000170| 61 6e 67 61 67 65 73 20 | 74 68 61 74 20 61 72 65 |angages |that are| |00000180| 20 6e 6f 74 20 63 6f 6d | 70 61 74 69 62 6c 65 0d | not com|patible.| |00000190| 20 20 69 6e 20 72 65 73 | 70 65 63 74 20 74 6f 20 | in res|pect to | |000001a0| 64 61 74 61 20 72 65 70 | 72 65 73 65 6e 74 61 74 |data rep|resentat| |000001b0| 69 6f 6e 2c 20 79 6f 75 | 20 77 69 6c 6c 20 68 61 |ion, you| will ha| |000001c0| 76 65 20 74 6f 20 6d 61 | 6b 65 20 73 6f 6d 65 20 |ve to ma|ke some | |000001d0| 63 68 6f 69 63 65 73 2e | 0d 0d 20 20 59 6f 75 20 |choices.|.. You | |000001e0| 63 61 6e 20 65 69 74 68 | 65 72 20 61 6c 6c 6f 63 |can eith|er alloc| |000001f0| 61 74 65 20 79 6f 75 72 | 20 64 61 74 61 20 73 74 |ate your| data st| |00000200| 72 75 63 74 75 72 65 73 | 20 61 6c 6c 20 69 6e 20 |ructures| all in | |00000210| 74 68 65 20 66 69 72 73 | 74 20 6c 61 6e 67 61 67 |the firs|t langag| |00000220| 65 0d 20 20 66 6f 72 6d | 61 74 2c 20 61 6c 6c 20 |e. form|at, all | |00000230| 69 6e 20 74 68 65 20 73 | 65 63 6f 6e 64 20 6c 61 |in the s|econd la| |00000240| 6e 67 61 67 65 20 66 6f | 72 6d 61 74 2c 20 6f 72 |ngage fo|rmat, or| |00000250| 20 61 20 6d 69 78 74 75 | 72 65 20 6f 66 20 62 6f | a mixtu|re of bo| |00000260| 74 68 2e 0d 0d 20 20 49 | 6e 20 65 69 74 68 65 72 |th... I|n either| |00000270| 20 63 61 73 65 2c 20 77 | 68 65 6e 20 6f 6e 65 20 | case, w|hen one | |00000280| 6f 66 20 74 68 65 20 74 | 77 6f 20 6c 61 6e 67 61 |of the t|wo langa| |00000290| 67 65 20 6e 65 65 64 73 | 20 74 6f 20 72 65 61 64 |ge needs| to read| |000002a0| 20 64 61 74 61 20 74 68 | 61 74 0d 20 20 77 61 73 | data th|at. was| |000002b0| 20 6e 6f 74 20 61 6c 6c | 6f 63 61 74 65 64 20 69 | not all|ocated i| |000002c0| 6e 20 69 74 73 20 66 6f | 72 6d 61 74 2c 20 74 68 |n its fo|rmat, th| |000002d0| 65 20 63 6f 64 65 20 77 | 69 6c 6c 20 62 65 20 61 |e code w|ill be a| |000002e0| 20 6c 69 74 74 6c 65 20 | 61 77 6b 77 61 72 64 0d | little |awkward.| |000002f0| 20 20 61 6e 64 20 61 20 | 6c 69 74 74 6c 65 20 62 | and a |little b| |00000300| 69 74 20 6c 65 73 73 20 | 65 66 66 69 63 69 65 6e |it less |efficien| |00000310| 74 20 62 65 63 61 75 73 | 65 20 6f 66 20 74 68 65 |t becaus|e of the| |00000320| 20 6e 65 63 65 73 73 61 | 72 79 20 63 6f 6e 76 65 | necessa|ry conve| |00000330| 72 73 69 6f 6e 73 2e 0d | 0d 20 20 41 6c 6c 20 74 |rsions..|. All t| |00000340| 68 69 73 20 74 6f 20 73 | 61 79 20 74 68 61 74 20 |his to s|ay that | |00000350| 74 68 65 20 66 69 72 73 | 74 20 73 74 65 70 20 69 |the firs|t step i| |00000360| 73 20 61 20 63 61 72 65 | 66 75 6c 6c 20 70 6c 61 |s a care|full pla| |00000370| 6e 6e 69 6e 67 20 6f 66 | 20 68 6f 77 20 79 6f 75 |nning of| how you| |00000380| 0d 20 20 69 6d 70 6c 65 | 6d 65 6e 74 20 79 6f 75 |. imple|ment you| |00000390| 72 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |r data s|tructure| |000003a0| 73 2e 0d 0d 48 65 72 65 | 20 61 72 65 20 61 20 66 |s...Here| are a f| |000003b0| 65 77 20 74 69 70 73 20 | 6f 6e 65 20 74 68 65 20 |ew tips |one the | |000003c0| 70 72 6f 73 20 61 6e 64 | 20 63 6f 6e 73 20 6f 66 |pros and| cons of| |000003d0| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 20 | data st|ructure | |000003e0| 61 6c 6c 6f 63 61 74 69 | 6f 6e 0d 69 6e 20 62 6f |allocati|on.in bo| |000003f0| 74 68 20 4d 43 4c 20 61 | 6e 64 20 54 68 69 6e 6b |th MCL a|nd Think| |00000400| 43 3a 0d 0d 20 20 49 66 | 20 79 6f 75 20 61 6c 6c |C:.. If| you all| |00000410| 6f 63 61 74 65 20 73 74 | 72 75 63 74 75 72 65 73 |ocate st|ructures| |00000420| 20 69 6e 20 43 20 28 69 | 6e 20 74 68 65 20 6d 61 | in C (i|n the ma| |00000430| 63 20 68 65 61 70 20 74 | 68 61 74 20 69 73 29 2c |c heap t|hat is),| |00000440| 20 79 6f 75 20 77 69 6c | 6c 0d 20 20 68 61 76 65 | you wil|l. have| |00000450| 20 74 6f 20 64 6f 20 79 | 6f 75 72 73 65 6c 66 20 | to do y|ourself | |00000460| 61 6c 6c 20 74 68 65 20 | 6a 6f 62 20 74 68 61 74 |all the |job that| |00000470| 20 4c 69 73 70 20 6e 6f | 72 6d 61 6c 6c 79 20 64 | Lisp no|rmally d| |00000480| 6f 65 73 20 66 6f 72 20 | 79 6f 75 2e 20 69 2e 65 |oes for |you. i.e| |00000490| 2e 0d 20 20 61 6c 6c 6f | 63 61 74 69 6e 67 20 74 |.. allo|cating t| |000004a0| 68 65 20 6d 65 6d 6f 72 | 79 2c 20 72 65 6c 65 61 |he memor|y, relea| |000004b0| 73 69 6e 67 20 69 74 2c | 20 65 74 63 2e 2e 2e 20 |sing it,| etc... | |000004c0| 54 68 69 73 20 69 73 20 | 70 72 65 74 74 79 20 70 |This is |pretty p| |000004d0| 61 69 6e 66 75 6c 6c 0d | 20 20 62 75 74 20 69 74 |ainfull.| but it| |000004e0| 20 69 73 20 74 68 65 20 | 63 6f 6e 63 65 73 73 69 | is the |concessi| |000004f0| 6f 6e 20 79 6f 75 20 68 | 61 76 65 20 74 6f 20 6d |on you h|ave to m| |00000500| 61 6b 65 2c 20 69 66 20 | 79 6f 75 20 77 61 6e 74 |ake, if |you want| |00000510| 20 62 6c 61 7a 69 6e 67 | 6c 79 20 66 61 73 74 0d | blazing|ly fast.| |00000520| 20 20 43 20 63 6f 64 65 | 2e 20 41 6c 73 6f 20 74 | C code|. Also t| |00000530| 68 69 73 20 61 70 70 72 | 6f 61 63 68 20 6c 65 74 |his appr|oach let| |00000540| 73 20 79 6f 75 20 77 72 | 69 74 65 20 6e 69 63 65 |s you wr|ite nice| |00000550| 20 43 20 63 6f 64 65 20 | 73 69 6e 63 65 20 74 68 | C code |since th| |00000560| 65 20 64 61 74 61 0d 20 | 20 69 73 20 69 6e 20 61 |e data. | is in a| |00000570| 20 66 6f 72 6d 61 74 20 | 74 68 61 74 20 69 74 20 | format |that it | |00000580| 75 6e 64 65 72 73 74 61 | 6e 64 73 20 72 65 61 64 |understa|nds read| |00000590| 69 6c 79 2e 20 41 6e 6f | 74 68 65 72 20 64 72 61 |ily. Ano|ther dra| |000005a0| 77 62 61 63 6b 20 6f 66 | 20 74 68 69 73 0d 20 20 |wback of| this. | |000005b0| 61 70 70 72 6f 61 63 68 | 20 69 73 20 74 68 61 74 |approach| is that| |000005c0| 20 79 6f 75 72 20 64 61 | 74 61 20 69 73 20 6e 6f | your da|ta is no| |000005d0| 74 20 74 79 70 65 64 20 | 61 6e 79 6d 6f 72 65 2c |t typed |anymore,| |000005e0| 20 73 6f 20 74 68 65 20 | 4c 69 73 70 20 65 6e 76 | so the |Lisp env| |000005f0| 69 72 6f 6e 6d 65 6e 74 | 0d 20 20 77 6f 6e 74 20 |ironment|. wont | |00000600| 62 65 20 61 62 62 6c 65 | 20 74 6f 20 64 69 73 70 |be abble| to disp| |00000610| 6c 61 79 20 69 74 20 69 | 6e 74 65 6c 6c 69 67 65 |lay it i|ntellige| |00000620| 6e 74 6c 79 2e 20 69 2e | 65 2e 20 41 6c 6c 20 79 |ntly. i.|e. All y| |00000630| 6f 75 72 20 64 61 74 61 | 20 77 69 6c 6c 0d 20 20 |our data| will. | |00000640| 6c 6f 6f 6b 20 6c 69 6b | 65 20 23 3c 41 20 4d 61 |look lik|e #<A Ma| |00000650| 63 20 5a 6f 6e 65 20 50 | 6f 69 6e 74 65 72 20 53 |c Zone P|ointer S| |00000660| 69 7a 65 20 31 32 20 23 | 78 37 44 44 44 43 34 3e |ize 12 #|x7DDDC4>| |00000670| 20 77 68 69 63 68 20 64 | 6f 65 73 6e 74 20 6d 61 | which d|oesnt ma| |00000680| 6b 65 0d 20 20 64 65 62 | 75 67 67 69 6e 67 20 76 |ke. deb|ugging v| |00000690| 65 72 79 20 65 61 73 79 | 2e 2e 2e 0d 0d 20 20 41 |ery easy|..... A| |000006a0| 6c 6c 6f 63 61 74 69 6e | 67 20 79 6f 75 72 20 73 |llocatin|g your s| |000006b0| 74 72 75 63 74 75 72 65 | 73 20 69 6e 20 4c 69 73 |tructure|s in Lis| |000006c0| 70 20 67 69 76 65 73 20 | 79 6f 75 20 61 6c 6c 20 |p gives |you all | |000006d0| 74 68 65 20 62 65 6e 65 | 66 69 74 73 20 6f 66 20 |the bene|fits of | |000006e0| 4c 69 73 70 0d 20 20 62 | 75 74 20 6d 61 6b 65 73 |Lisp. b|ut makes| |000006f0| 20 79 6f 75 72 20 43 20 | 63 6f 64 65 20 68 61 72 | your C |code har| |00000700| 64 65 72 20 74 6f 20 77 | 72 69 74 65 20 61 6e 64 |der to w|rite and| |00000710| 20 73 6f 6d 65 77 68 61 | 74 20 6c 65 73 73 20 65 | somewha|t less e| |00000720| 66 66 69 63 69 65 6e 74 | 2e 20 42 75 74 0d 20 20 |fficient|. But. | |00000730| 65 76 65 6e 20 74 68 65 | 6e 20 79 6f 75 72 20 43 |even the|n your C| |00000740| 20 63 6f 64 65 20 73 68 | 6f 75 6c 64 20 72 75 6e | code sh|ould run| |00000750| 20 66 61 73 74 65 72 20 | 74 68 61 6e 20 74 68 65 | faster |than the| |00000760| 20 4c 69 73 70 20 65 71 | 75 69 76 61 6c 65 6e 74 | Lisp eq|uivalent| |00000770| 20 62 65 63 61 75 73 65 | 0d 20 20 69 74 20 77 6f | because|. it wo| |00000780| 6e 74 20 6e 65 65 64 20 | 74 6f 20 64 6f 20 61 6e |nt need |to do an| |00000790| 79 20 74 79 70 65 20 63 | 68 65 63 6b 69 6e 67 2c |y type c|hecking,| |000007a0| 20 61 6e 64 20 77 69 6c | 6c 20 61 6c 73 6f 20 72 | and wil|l also r| |000007b0| 75 6e 20 69 6e 20 63 6f | 6e 73 74 61 6e 74 20 6d |un in co|nstant m| |000007c0| 65 6d 6f 72 79 0d 20 20 | 73 6f 20 69 74 20 77 6f |emory. |so it wo| |000007d0| 6e 27 74 20 67 61 72 62 | 61 67 65 20 63 6f 6c 6c |n't garb|age coll| |000007e0| 65 63 74 2e 0d 0d 20 20 | 54 68 65 20 69 64 65 61 |ect... |The idea| |000007f0| 6c 20 73 6f 6c 75 74 69 | 6f 6e 20 69 73 20 70 72 |l soluti|on is pr| |00000800| 6f 62 61 62 6c 79 20 74 | 6f 20 72 65 61 6c 6c 79 |obably t|o really| |00000810| 20 77 65 6c 6c 20 69 73 | 6f 6c 61 74 65 20 74 68 | well is|olate th| |00000820| 65 20 63 6f 6d 70 75 74 | 61 74 69 6f 6e 61 6c 6c |e comput|ationall| |00000830| 79 0d 20 20 65 78 70 61 | 6e 73 69 76 65 20 70 61 |y. expa|nsive pa| |00000840| 72 74 73 20 6f 66 20 79 | 6f 75 72 20 63 6f 64 65 |rts of y|our code| |00000850| 20 61 6e 64 20 74 72 61 | 6e 73 66 65 72 20 6f 6e | and tra|nsfer on| |00000860| 6c 79 20 74 68 6f 73 65 | 20 69 6e 20 43 2e 20 53 |ly those| in C. S| |00000870| 69 6e 63 65 20 74 68 65 | 20 43 20 63 6f 64 65 0d |ince the| C code.| |00000880| 20 20 79 6f 75 20 64 65 | 66 69 6e 65 20 69 73 20 | you de|fine is | |00000890| 6e 6f 74 20 75 73 65 72 | 20 69 6e 74 65 72 72 75 |not user| interru| |000008a0| 70 74 69 62 6c 65 2c 20 | 69 74 20 69 73 20 62 65 |ptible, |it is be| |000008b0| 73 74 20 74 6f 20 64 65 | 66 69 6e 65 20 73 6d 61 |st to de|fine sma| |000008c0| 6c 6c 0d 20 20 66 75 6e | 63 74 69 6f 6e 73 20 72 |ll. fun|ctions r| |000008d0| 61 74 68 65 72 20 74 68 | 61 74 20 6c 61 72 67 65 |ather th|at large| |000008e0| 20 6f 6e 65 73 20 28 73 | 6f 20 4c 69 73 70 20 67 | ones (s|o Lisp g| |000008f0| 65 74 73 20 61 20 6c 6f | 74 20 6f 66 20 6f 63 63 |ets a lo|t of occ| |00000900| 61 73 69 6f 6e 73 20 74 | 6f 0d 20 20 6d 61 6e 61 |asions t|o. mana| |00000910| 67 65 20 75 73 65 72 20 | 65 76 65 6e 74 73 29 2e |ge user |events).| |00000920| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000980| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 46 |.......n|...n...F| |00000990| 20 77 69 6c 6c 20 6e 65 | 65 64 20 74 6f 20 72 65 | will ne|ed to re| |000009a0| 61 64 20 64 61 74 61 20 | 74 68 61 74 0d 20 20 77 |ad data |that. w| |000009b0| 08 54 48 4f 55 47 48 54 | 53 00 02 00 00 00 54 45 |.THOUGHT|S.....TE| |000009c0| 58 54 43 43 4c 32 01 00 | 00 37 00 e4 00 00 00 00 |XTCCL2..|.7......| |000009d0| 00 00 54 45 58 54 43 43 | 4c 32 01 00 00 37 00 e4 |..TEXTCC|L2...7..| |000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000009f0| 00 00 a5 57 d1 70 00 00 | 08 a1 00 00 01 b4 69 74 |...W.p..|......it| |00000a00| 74 6c 65 20 62 69 74 20 | 6c 65 73 73 20 65 66 66 |tle bit |less eff| |00000a10| 69 63 69 65 6e 74 20 62 | 65 63 61 75 73 65 20 6f |icient b|ecause o| |00000a20| 66 20 74 68 65 20 6e 65 | 63 65 73 73 61 72 79 20 |f the ne|cessary | |00000a30| 63 6f 6e 76 65 72 73 69 | 6f 6e 73 2e 0d 0d 20 20 |conversi|ons... | |00000a40| 41 6c 6c 20 74 68 69 73 | 20 74 6f 20 73 61 79 20 |All this| to say | |00000a50| 74 68 61 74 20 74 68 65 | 20 66 69 72 73 74 20 73 |that the| first s| |00000a60| 74 65 70 20 69 73 20 61 | 20 63 61 72 65 66 75 6c |tep is a| careful| |00000a70| 6c 20 70 6c 61 6e 6e 69 | 6e 67 20 6f 66 20 68 6f |l planni|ng of ho| |00000a80| 00 00 00 1e 00 03 00 04 | 09 01 00 04 09 00 00 04 |........|........| |00000a90| 09 02 01 00 00 00 02 00 | 00 30 03 00 00 32 02 00 |........|.0...2..| |00000aa0| 00 60 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.`...H..|Monaco..| |00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000ac0| 00 00 00 00 00 00 00 00 | 00 06 00 08 00 2c 00 06 |........|.....,..| |00000ad0| 01 da 02 04 00 2c 00 06 | 01 da 02 04 00 00 00 00 |.....,..|........| |00000ae0| 00 00 00 62 00 00 00 62 | 00 00 00 00 01 00 00 00 |...b...b|........| |00000af0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 46 00 99 |.....n..|.n...F..| |00000b00| ed e8 08 16 00 00 00 1c | 00 46 00 01 46 52 45 44 |........|.F..FRED| |00000b10| 00 00 00 12 4d 50 53 52 | 00 00 00 1e 00 02 ff ff |....MPSR|........| |00000b20| 00 00 00 00 00 00 00 00 | 03 ed ff ff 00 00 00 22 |........|......."| |00000b30| 00 9a c5 94 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+